import argparse
from mindspore import load, context
context.set_context(save_graphs = 2)

if __name__ == '__main__':
    parser = argparse.ArgumentParser(description="Dump MindIR to ir text")
    parser.add_argument("-m", "--model", required=True, nargs=1, type=str, help="MindIR file to be converted to .ir")
    args = parser.parse_args()
    source_file = args.model[0]

    load(source_file)